home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / cli / nutshell.arc / NUTSHELL.DOC < prev   
Text File  |  1989-04-10  |  4KB  |  80 lines

  1. Good news for mousee-haters.  Have your shell within a GEM application too!
  2.  
  3. Description:
  4.  
  5. NutShell v 1.0 (30-mar-1989) is NOT a shell.  It merely is an interface to a 
  6. running shell using a system() call over the _shell_p pointer (used in 
  7. GPshell and Gulam, maybe others).  (It can Pexec a shell as well, but this is 
  8. of course much slower and much more likely to crash the open application.)  
  9. This means that when a shell implementing the _shell_p mechanism is running 
  10. NutShell will give you all its power within a GEM applications.  It has been 
  11. tested with the GPshell of the CRAFT package, but should work with (among 
  12. others) Gulam as well.  It is written in Turbo-C using the CRAFT system.o and 
  13. will run both as an accessory (nutshell.acc) and as a program (nutshell.prg). 
  14. Just change the extension.
  15.  
  16. Memory requirements:
  17.  
  18. NutShell has been kept as small as possible, so that TeX and other 
  19. notoriously big programs can run even in its presence.  The static size is 
  20. about 7K.  However, when running it needs a few extra K to store the menu 
  21. bar, and the GPshell will not do anything without 17K free memory.  Most GEM 
  22. applications just take all available memory.  A mechanism for grabbing memory 
  23. from GEM applications, but not from tex.ttp, has been implemented using the 
  24. command
  25. $ malloc n
  26. This will make the NutShell reserve n Kbyte every time you log out and every 
  27. time it receives an AC_CLOSE (accessory close) signal.  This signal normally 
  28. arrives only when a new GEM application starts, as the GPshell keeps total 
  29. control in the meantime and does not give AES a chance to do anything.  This 
  30. way any GEM application will have to give up n K, whereas a TOS program has 
  31. all space (yes, I know, dirty).
  32.  
  33. Hence: start up a GEM application that leaves memory (UniTerm with the system 
  34. buffer set to >20 K, desk.prg, tcbsp4.prg, Tools dvi.prg before format/start,
  35. ...), start NutShell, type malloc n (n > 17), type lo, exit the application 
  36. and all is set up.  You can also do this from the desktop, but then you will 
  37. permanently lose the n K.
  38.  
  39. Features:
  40.  
  41. A history of 1 has been built in.  The arrow keys and ^U, ^T work as in the 
  42. GPshell.  Function keys are passed as $PFn, so that the GPshell mechanism for 
  43. defining function keys still works (NB. do not use "set PFn = 'aap noot 
  44. mies'" but "set PFn = ( aap noot mies )").  PF20 is interpreted as 'lo', as 
  45. in STedi. Filename completion is not supported, nor are csh-like history 
  46. references (such as '!e').  For multiline commands use <lf> to seperate:
  47. '$ foreach file ( * ) ^J echo $file ^J end'.
  48.  
  49. You can change the standard shell to be Pexec'd and its home directory from 
  50. the desktop using a binary editor, extra space has been reserved.  An easy 
  51. way to get an interactive shell is to start nutshell.prg from the accessory.
  52.  
  53. Problems:
  54.  
  55. Only works on a standard screen.  Internal shell commands work great as long 
  56. as they are accessible over the system() interface (not: ramdisk, cache, 
  57. font, logout, lpr, lprm, moreheap, mouse (in the GPshell)).  Running an 
  58. external program from an accessory is a risky business.  I found with this 
  59. version (1.0) there are three kinds of applications:
  60.  
  61. - normal: (desk, tcbsp4, Kettler previewer): TOS programs will run OK,
  62.   anything even remotely using GEM (including STedi) will crash GEM when 
  63.   exiting the application.
  64.  
  65. - weak: (UniTerm 2.0c, tc.prg): Running ANY program will crash UniTerm and
  66.   tc.prg.  However, both of these allow an external program to be run 
  67.   directly: rename nutshell.acc to nutshell.prg and run.
  68.  
  69. - strong: (Tools dvi.prg): STedi.prg seems to run OK, of course full GEM still
  70.   is a no-no.
  71.  
  72. I hope to include info on more combinations in the future, please report 
  73. problems to me.
  74.  
  75. Geert Jan van Oldenborgh,
  76. Ank van der Moerstraat 24,
  77. NL-2331 HS Leiden,
  78. tel 071-317512.
  79. t19@nikhefh.hep.nl
  80.